package com.gg.zjj.controller;

import com.gg.common.pojo.DFile;
import com.gg.zjj.service.ProductionPlanRegistrationService;
import com.gg.zjj.util.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author koco
 * 2022/10/11
 * 14:20
 */
@Controller
@RequestMapping("/zjj/")
public class ProductionPlanRegistrationController {
    @Resource
    private ProductionPlanRegistrationService registrationService;

    @RequestMapping("InquireAllProducts.action")
    @ResponseBody
    private Result<List<DFile>> queryDFileList(){
        return Result.success(registrationService.InquireAllProductsService());
    }

    @RequestMapping("addProductionPlan.action")
    @ResponseBody
    private Result addProductionPlan(@RequestBody String jsonArray){
        registrationService.addProductionPlanService(jsonArray);
        return Result.success();
    }
}
